package com.gitee.wsl.ext.bitcode

infix fun Int.hasFlag(flag: Int) = this and flag != 0

infix fun Int.withFlag(flag: Int)= this or flag
infix fun Int.minusFlag(flag: Int)= this and flag.inv()

infix fun Long.hasFlag(flag: Long): Boolean = flag and this == flag
infix fun Long.withFlag(flag: Long): Long = this or flag
infix fun Long.minusFlag(flag: Long): Long = this and flag.inv()